/*
 * @Description: 规则
 * @version: 1.0
 * @Company: ZMT
 * @Port: 熊健
 * @Author: XU BING
 * @Date: 2018-10-31 14:41:42
 * @LastEditors: XU BING
 * @LastEditTime: 2018-11-21 14:39:27
 */

var app = {};
var module = {
    init: function () {
        app = new Vue({
            el: '#app',
            data: {
                type: '',
                time: 24,
                GroupType:""
            },
            methods: {
                init: function () {                
                    app.type=getQueryString('type')
                   
                    if(getQueryString('type')==1){
                        app.GroupType="new_guest_pt_groupon"
                    }else if(getQueryString('type')==2){
                        app.GroupType="common_pt_groupon"
                    }else if(getQueryString('type')==3){
                        app.GroupType="colonel_free_pt_groupon"                     
                    }

                    app.getruletime()
                },
                getruletime: function () {
                    ajaxTemplate(addressTest + SERVICE.PTgetruletime, function (data) {

                        if (data.tag == 0) {

                            app.time = data.data.result
                        } else {
                            app.time = 24
                        };
                    }, {
                        GroupType:app.GroupType
                    },true);
                }
            }
        });
        app.init()
    }
}
module.init()